﻿<!DOCTYPE html>
<html>
<head>
	<meta charset="GBK">
	<title>添加案件</title>
	<link rel="stylesheet" type="text/css" href="../../easyui/1.3.4/themes/metro/easyui.css" />
    <link rel="stylesheet" type="text/css" href="../../css/yz-global.css" />
    <link rel="stylesheet" type="text/css" href="../../css/yz-icon.css" />
    
    <script type="text/javascript" src="../../js/jquery-1.8.0.min.js"></script>
    <script type="text/javascript" src="../../easyui/1.3.4/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../../easyui/1.3.4/locale/easyui-lang-zh_CN.js"></script>
    <script>
         /**
     * Name 分页过滤器
     */
    function pagerFilter(data) {
        if (typeof data.length == 'number' && typeof data.splice == 'function') { // is array                
            data = {
                total: data.length,
                rows: data
            }
        }
        var dg = $(this);
        var opts = dg.datagrid('options');
        var pager = dg.datagrid('getPager');
        pager.pagination({
            onSelectPage: function(pageNum, pageSize) {
                opts.pageNumber = pageNum;
                opts.pageSize = pageSize;
                pager.pagination('refresh', {
                    pageNumber: pageNum,
                    pageSize: pageSize
                });
                dg.datagrid('loadData', data);
            }
        });
        if (!data.originalRows) {
            data.originalRows = (data.rows);
        }
        var start = (opts.pageNumber - 1) * parseInt(opts.pageSize);
        var end = start + parseInt(opts.pageSize);
        data.rows = (data.originalRows.slice(start, end));
        return data;
    }

    /**
     * Name 载入数据
     */
    $('#yz-datagrid-2').datagrid({
        url: '../../temp/datagrid.php',
        loadFilter: pagerFilter,
        rownumbers: true,
        singleSelect: false,
        pageSize: 20,
        pagination: true,
        multiSort: true,
        fitColumns: true,
        fit: true,
        columns: [
            [{
                checkbox: true
            }, {
                field: 'productid',
                title: 'productid',
                width: 100,
                sortable: true
            }, {
                field: 'productname',
                title: 'productname',
                width: 180,
                sortable: true
            }, {
                field: 'unitcost',
                title: 'unitcost',
                width: 100
            }, {
                field: 'listprice',
                title: 'listprice',
                width: 100
            }, {
                field: 'attr1',
                title: 'attr1',
                width: 100
            }, {
                field: 'itemid',
                title: 'itemid',
                width: 100
            }, {
                field: 'status',
                title: 'status',
                width: 100
            }]
        ]
    });
    </script>
</head>
<body>
	 <div class="easyui-layout" data-options="fit:true">
        <form id="yz-form-2" method="post">
            <table>
                <tr>
                    <td width="60" align="right">姓 名:</td>
                    <td>
                        <input type="text" name="name" class="yz-text" />
                    </td>
                </tr>
                <tr>
                    <td align="right">邮 箱:</td>
                    <td>
                        <input type="text" name="email" class="yz-text" />
                    </td>
                </tr>
                <tr>
                    <td align="right">主 题:</td>
                    <td>
                        <input type="text" name="subject" class="yz-text" />
                    </td>
                </tr>
                <tr>
                    <td valign="top" align="right">内 容:</td>
                    <td>
                        <textarea name="content" rows="6" class="yz-textarea" style="width:260px"></textarea>
                    </td>
                </tr>
            </table>
        </form>
    </div>
</body>
</html>